<?php
define('PT_MINIMUM_PRIORITY', 	0x00000001);
define('PT_FATAL_ERROR', 	0x00001000);
define('PT_WARNING', 		0x00000100);
define('PT_INFORMATION',	0x00000010);
define('PT_DEBUG',		0x00000001);

$start_time = (float) array_sum(explode(' ', microtime()));

(@include_once 'xsampatrans.php') or die(message("X-SAMPA translator is not available.", PT_FATAL_ERROR));
(@include_once 'segmentdb.php') or die(message("Segment database is not available.", PT_FATAL_ERROR));

function timestamp() { 
	global $start_time;
	$current_time = (float) array_sum(explode(' ', microtime())); 
	return "[" . sprintf("%.4f", ($current_time - $start_time)) . "]";
	
}

function message($message, $priority) {
	if ($priority >= PT_MINIMUM_PRIORITY) { 
		$timestamp = (float) array_sum(explode(' ', microtime()));
		print timestamp() . " $message<br />\n"; 
	}
}

message(translate_xsampa("[f@.\"na.l@.d_Zi \"tulz vr=.\"Z@n oU poInt w@n]"), PT_DEBUG);

//$obj = new CFeatureSet();
?>

